home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Resources / Media / MediaCoder 0.6.0.3690 / MediaCoder-0.6.0.3690.exe / htdocs / prefs / value.xsl < prev   
Encoding:
Extensible Markup Language  |  2007-05-14  |  2.1 KB  |  83 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3. <xsl:output method="xml" encoding="utf-8" doctype-public="-//MOZILLA//DTD XUL V1.0//EN"/>
  4. <xsl:template match="/MediaCoderPrefs/node/node/node">
  5.  
  6. <window id="prefs_window"
  7.         title="Preferences"
  8.         xmlns:html="http://www.w3.org/1999/xhtml"
  9.         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  10.         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  11.         style="width:100%; height:100%"
  12.         >
  13. <hbox>
  14. <xsl:choose>
  15. <xsl:when test="@type='bool'">
  16.  
  17.     <vbox>
  18.     <radiogroup orient="horizontal">
  19.     <radio label="Yes" oncommand="SaveValue('true')">
  20.     <xsl:if test="value='true'"><xsl:attribute name="selected">true</xsl:attribute></xsl:if>
  21.     </radio>
  22.     <radio label="No" oncommand="SaveValue('false')">
  23.     <xsl:if test="value!='true'"><xsl:attribute name="selected">true</xsl:attribute></xsl:if>
  24.     </radio>
  25.     </radiogroup>
  26.     </vbox>
  27.     <vbox flex="1"/>
  28.  
  29. </xsl:when>
  30.  
  31. <xsl:when test="@type='enum'">
  32.  
  33.     <vbox>
  34.     <menulist flex="false" oncommand="SaveValue(selectedItem.getAttribute('label'))">
  35.         <menupopup>
  36.             <xsl:for-each select="enum">
  37.             <menuitem>
  38.                 <xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
  39.                 <xsl:if test=".=../value"><xsl:attribute name="selected">true</xsl:attribute></xsl:if>
  40.             </menuitem>
  41.             </xsl:for-each>
  42.         </menupopup>
  43.     </menulist>
  44.     </vbox>
  45.     <vbox flex="1"/>
  46.  
  47. </xsl:when>
  48.  
  49. <xsl:when test="@type='int' or @type='float'">
  50.  
  51.     <vbox>
  52.     <button label="Apply"/>
  53.     </vbox>
  54.     <vbox>
  55.     <textbox onchange="SaveValue(this.value)" size="8">
  56.     <xsl:attribute name="value"><xsl:value-of select="value"/></xsl:attribute>
  57.     </textbox>
  58.     </vbox>
  59.     <vbox flex="1"/>
  60.  
  61. </xsl:when>
  62.  
  63. <xsl:otherwise>
  64.  
  65.     <vbox>
  66.     <button label="Apply"/>
  67.     </vbox>
  68.     <vbox flex="1">
  69.     <textbox onchange="SaveValue(this.value)">
  70.     <xsl:attribute name="value"><xsl:value-of select="value"/></xsl:attribute>
  71.     </textbox>
  72.     </vbox>
  73.  
  74. </xsl:otherwise>
  75.  
  76. </xsl:choose>    
  77.  
  78. </hbox>
  79.  
  80. </window>
  81. </xsl:template>
  82.  
  83. </xsl:stylesheet>